
<div id="app">
    <el-card class="box-card">
        <div style="height: 30px;"></div>
        <el-row>
            <el-col :span="13">
                <el-form :model="form" :rules="rules" ref="form"  label-width="122px">
                    <el-form-item label="智能识别" >
                       <el-row>
                           <el-col :span="19">
                               <el-input type="textarea" :rows="10" v-model="desc"></el-input>
                               <div style="color: rgba(153, 153, 153, 1);
font-size: 12px;line-height: 1.6;">
                               </div>
                           </el-col>
                           <el-col :offset="1" :span="4">
                               <div><el-button size="mini" @click="clear_empit">清空</el-button></div>
                               <div><el-button size="mini" type="primary" @click="nowLook">快速识别</el-button></div>
                           </el-col>
                       </el-row>
                    </el-form-item>
                        <el-form-item label="收货人" prop="consignee">
                              <el-input v-model="form.consignee"></el-input>
                        </el-form-item>
                    <el-form-item label="联系电话" prop="contact_phone">
                          <el-input v-model="form.contact_phone"></el-input>
                    </el-form-item>
                    <el-form-item label="收货地址" prop="provinces">
                        <el-row>
                            <el-col :span="4" >
                                <el-select v-model="form.provinces" @change="handleChangeTc"  placeholder="省份/地区">

                                    <el-option v-for="item of provinceArr" :label="item.name" :value="item.id"></el-option>
                                </el-select>
                            </el-col>
                            <el-col :span="4" :offset="1">
                                <el-select v-model="form.city" @change="handleChangeShi" placeholder="城市">
                                    <el-option v-for="item of cityArr" :label="item.name" :value="item.id"></el-option>
                                </el-select>
                            </el-col>
                            <el-col :span="4" :offset="1">
                                <el-select v-model="form.area" placeholder="区/县">
                                    <el-option v-for="item of areaArr" :label="item.name" :value="item.id"></el-option>
                                </el-select>
                            </el-col>
                            <el-col :span="9"  :offset="1">
                                <el-input placeholder="详细地址" v-model="form.address"></el-input>
                            </el-col>
                        </el-row>
                    </el-form-item>

                    <el-form-item label="收款金额" prop="amount_collected">
                        <el-row>
                            <el-col :span="7"><el-input v-model="form.amount_collected" placeholder="请输入收款金额"></el-input></el-col>
                            <el-col :span="1" :offset="1"><span>元</span></el-col>
                        </el-row>
                    </el-form-item>
                    <el-form-item label="商品信息" prop="goodsArr">

<!--                        <el-button type="primary" @click="dialogVisible = true">-->
<!--                            添加商品-->
<!--                        </el-button>-->
                        <el-table
                                :data="form.goodsArr"
                                border
                                style="width: 100%">
                            <el-table-column
                                    prop="good_name"
                                    label="名称"
                                    width="">
                            </el-table-column>
                            <el-table-column
                                    label="数量"
                                    width="180"
                                prop="num"
                            >
<!--                                <template slot-scope="{row,$index}">-->
<!--                                    <el-input type="number" v-model="row.num" ></el-input>-->
<!--                                </template>-->
                            </el-table-column>
<!--                            <el-table-column-->
<!--                                    label="操作">-->
<!--                                <template slot-scope="{row}">-->
<!--                                    <el-button type="danger" @click="del(row.id)" icon="el-icon-delete" circle></el-button>-->
<!--                                </template>-->
<!--                            </el-table-column>-->
                        </el-table>
                    </el-form-item>
                    <el-form-item label="收款凭证" prop="collection_voucher">
                        <div style="width: 1200px;">
                            <el-upload
                                    action="/admin/ajax/upload"
                                    list-type="picture-card"
                                    :on-preview="handlePictureCardPreview"
                                    :on-success="handleAvatarSuccessList"
                                    :before-upload="beforeAvatarUpload"
                                    :file-list="imgList"
                                    :on-remove="handleRemove">



                                <i class="el-icon-plus"></i>
                            </el-upload>
                            <el-dialog :visible.sync="dialogVisibleImg">
                                <img width="100%" :src="dialogImageUrl" alt="">
                            </el-dialog>
                        </div>
                    </el-form-item>
                    <el-form-item label="备注" prop="remark">
                        <el-input v-model="form.remark" placeholder="请输入内容"></el-input>
                    </el-form-item>
                    <el-form-item label="" >
                        <div style="margin-top: 50px;">
                            <el-button type="primary" @click="successOrder(2)">确认下单</el-button>
                            <el-button type="primary" @click="successOrder(1)">保存</el-button>
                        </div>
                    </el-form-item>
                </el-form>
            </el-col>
        </el-row>

    </el-card>
    <el-dialog
            title="提示"
            :visible.sync="dialogVisible"
            width="70%"
            :show-close="false"
            :before-close="handleClose">
        <el-form :inline="true" :model="formInline" class="demo-form-inline">
            <el-form-item label="商品分类">
                <el-select v-model="formInline.good_type_id" placeholder="请选择">
                    <el-option v-for="item of good_type" :label="item.title" :value="item.id"></el-option>
                </el-select>
            </el-form-item>
            <el-form-item label="商品名称">
                <el-input v-model="formInline.title" placeholder="请输入关键字"></el-input>
            </el-form-item>
            <el-form-item>
                <el-button type="primary" @click="onSubmit">查询</el-button>
            </el-form-item>
        </el-form>
        <div style="height: 30px"></div>

        <el-table
                :data="goodsArr"
                border
                @selection-change="handleSelectionChange"
                @select="handleSelect"
                style="width: 100%">
            <el-table-column
                    type="selection"
                    width="180">
            </el-table-column>
            <el-table-column
                    prop="title"
                    label="商品名称"
                    width="180">
            </el-table-column>
            <el-table-column
                    prop="good_type_name"
                    label="商品分类"
                    width="180">
            </el-table-column>
            <el-table-column
                    prop="stock"
                    label="库存">
            </el-table-column>
        </el-table>
        <div style="height: 50px"></div>
    <el-button @click="dialogVisible = false">取 消</el-button>
    <el-button type="primary" @click="success">确 定</el-button>
  </span>
    </el-dialog>
</div>
<script !src="">
    new Vue({
        el: '#app',
        data: function() {
            return {
                options: [{
                    value: '顺丰',
                    label: '顺丰'
                }, {
                    value: '申通',
                    label: '申通'
                }, {
                    value: '圆通',
                    label: '圆通'
                },{
                    value: '韵达',
                    label: '韵达'
                },{
                    value: '极兔',
                    label: '极兔'
                }],
                sheng:'',
                shi:'',
                qu:'',
                desc:'',
                deta:'',
                num:0,
                cityArr:[],
                areaArr:[],
                good_type:[],
                goodsArr:[],
                provinceArr:[],
                dialogVisible: false,
                formInline:{
                    good_type_id:'',
                    title:''
                },
                imgList:[],
                rules:{
                    consignee:[{ required: true, message: '不能为空',  trigger: 'blur' }],
                    is_cooperate:[{ required: true, message: '不能为空',  trigger: 'blur' }],
                    image:[{ required: true,  message: '不能为空', trigger: 'blur' }],
                    contact_phone:[{ required: true,  message: '不能为空', trigger: 'blur' }],
                    amount_collected:[{ required: true,  message: '不能为空', trigger: 'blur' }],
                    collection_voucher:[{ required: true,  message: '不能为空', trigger: 'blur' }],
                    cooperative_express:[{ required: true, message: '不能为空',  trigger: 'blur' }],
                    provinces:[{ required: true,  message: '不能为空', trigger: 'blur' }],
                    city:[{ required: true,  message: '不能为空', trigger: 'blur' }],
                    area:[{ required: true,  message: '不能为空', trigger: 'blur' }],
                    address:[{ required: true,  message: '不能为空', trigger: 'blur' }],
                    status:[{ required: true, message: '不能为空',  trigger: 'blur' }],
                    goodsArr:[{ required: true, message: '不能为空' }],
                },
                dialogImageUrl:'',
                form:{
                    consignee:'',
                    is_cooperate:'1',
                    contact_phone:'',
                    amount_collected:'',
                    collection_voucher:'',
                    remark:'',
                    cooperative_express:'',
                    provinces:'',
                    city:'',
                    area:'',
                    address:'',
                    status:'',
                    goodsArr:[]
                },
                imageUrl:'',
                selArr:[],
                orderArr:[],
                goodsArr_:[],
                dialogVisibleImg:false,
                good_has_err:false
            }
        },
        created(){
            this.provinceArr = <?= json_encode($provinces) ?>;
            var that = this
            $.ajax({
                url: '/admin/ord.order/good_type',
                type: 'POST',
                dataType: 'json',
                success: function (res) {
                    that.good_type = res.data
                }
            })
            this.onSubmit()
        },
        methods:{
            clear_empit(){
                this.desc = ''
            },
            nowLook_(){
                try {
                    var descArr = this.desc.split(/[\n]/g)
                }catch (e) {
                    this.$message.error('格式错误');
                }
                descArr.map(item=>{
                    if(item.indexOf('收货人')!==-1){
                        try {
                            this.form.consignee = item.split('：')[1]
                        }catch (e) {
                            this.$message.error('格式错误');
                        }
                    }else if(item.indexOf('联系电话')!==-1){

                        try {
                            this.form.contact_phone = item.split('：')[1]
                        }catch (e) {
                            this.$message.error('格式错误');
                        }
                    }else if(item.indexOf('收款金额')!==-1){
                        try {
                            this.form.amount_collected = item.split('：')[1]
                        }catch (e) {
                            this.$message.error('格式错误');
                        }

                    }else if(item.indexOf('备注')!==-1){
                        try {
                            this.form.remark = item.split('：')[1]
                        }catch (e) {
                        }
                    }else if(item.indexOf('商品信息')!==-1){
                        var arr = []
                        try {
                            var orderInfo = item.split('：')[1]
                            var orderArr = orderInfo.split(',')
                        }catch (e) {
                            this.$message.error('格式错误');
                        }
                        orderArr.map((item,index)=>{
                            var order = {}
                            try {
                                var itemArr = item.split(' ')
                                order.good_name = itemArr[0]
                                order.num = itemArr[1]
                                var goods = this.goodsArr.find(d=>d.title==order.good_name)
                                if(goods && goods.id){
                                    order.gid = goods.id
                                }else{
                                    this.$message.error('商品不存在');
                                }
                                if(order.good_name && order.num && order.gid){
                                    arr.push(order)
                                }
                            }catch (e) {
                                // this.$message.error('格式错误');
                            }
                        })
                        this.form.goodsArr = arr
                    }else if(item.indexOf('收款凭证')!==-1){
                        this.imgList = []
                        try {
                            var collection_voucher =  item.split('：')[1]
                        }catch (e) {
                            // this.$message.error('格式错误');
                        }

                        this.form.collection_voucher = collection_voucher

                        try {
                            this.selArr = collection_voucher.split(',')
                        }catch (e) {
                            // this.$message.error('格式错误');
                        }

                        this.selArr.map(data => {
                            this.imgList.push({
                                name: data,
                                url: data
                            })
                        })
                    }

                })
            },
            nowLook(){
                var desc = this.desc
                var goods = []
                this.good_has_err = false
                $.ajax({
                    url: '/admin/index/get_good',
                    type: 'GET',
                    success:(res)=>{
                        if(res.code ==1){
                            goods = res.data
                            var goodsArr = []
                            var goodsArrSear = desc.match(/\S{1,}\s+\d{1,5}([\r\n]|\s+)/g) || []

                            var good_item = desc.match(/\S{1,}\s+\d+$/)
                            var tel_r = /(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}/g;
                            if(good_item && good_item[0].search(tel_r)==-1){
                                goodsArrSear.push(good_item[0])
                            }
                            goodsArrSear.map(god=>{
                                var god_g = god.match(/^\S{1,}\s+/)[0].trim()
                                var god_n = god.match(/\s+\d{1,5}/)[0].trim()
                                goods.map(item=>{
                                    if(item.title == god_g){
                                            desc = desc.replace(god,'')
                                            var find_i = goodsArr.findIndex(d=>d.gid==item.id)
                                            if(find_i==-1){
                                                goodsArr.push({
                                                    good_name:item.title,
                                                    num:god_n,
                                                    gid:item.id
                                                })
                                            }else{
                                                goodsArr[find_i].num = num
                                            }
                                    }
                                })
                            })
                            if(goodsArr.length>0){
                                this.form.goodsArr = goodsArr
                            }
                            desc = desc.trim()
                            if(desc.replace(/\s/g,'').length > 0){
                                var goodarr = desc.match(/\S{1,}\s+\d{1,5}([\r\n]|\s+)/g) || []
                                var good_item = desc.match(/\S{1,}\s+\d+$/)
                                var tel_r = /(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}/g;
                                if(good_item && good_item[0].search(tel_r)==-1){
                                    goodarr.push(good_item[0])
                                }

                                goodarr.map(item=>{
                                    if(item.search(tel_r)==-1){
                                        desc = desc.replace(item,'')
                                        item = item.replace(/\s+\d+/,'')
                                        this.good_has_err = true
                                        setTimeout(()=>{
                                            this.$notify({
                                                title: '警告',
                                                type: 'warning',
                                                message:'商品 '+item+' 无法识别',
                                                duration: 2000
                                            });
                                        },100)
                                    }
                                })
                                if(desc.search(/\S/)!==-1){
                                    var reg_tel = /(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{5,}-\d{1,}/g;
                                    var tel_search = desc.match(reg_tel)
                                    var tel = null
                                    if(tel_search){
                                        tel = tel_search[0]
                                        desc = desc.replace(reg_tel,'')
                                        var tel_reg = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}-\d{4}$/;
                                        if(tel_search[0].trim().search(tel_reg)==-1){
                                            this.$notify({
                                                title: '警告',
                                                message: '手机号码填写错误',
                                                // position:"top-left",
                                                type: 'warning'
                                            });
                                        }
                                    }else {
                                        var reg_tel_rr = /(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{5,}/g;
                                        var tel_sear = desc.match(reg_tel_rr)
                                        if(tel_sear){

                                            tel = tel_sear[0]
                                            desc = desc.replace(reg_tel_rr,'')

                                            var tel_reg__ = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
                                            if(tel_sear[0].trim().search(tel_reg__)==-1){
                                                this.$notify({
                                                    title: '警告',
                                                    message: '手机号码填写错误',
                                                    // position:"top-left",
                                                    type: 'warning'
                                                });
                                            }
                                        }
                                    }

                                    var info = AddressParse.parse(desc)[0]

                                    if (info.city == '省直辖县' || info.city == '自治区直辖县级行政区划') {
                                        info.city = info.area
                                        info.area = ''
                                    }
                                    if (info.province == '澳门特别行政区') {
                                        info.province = '中国澳门'
                                        info.city = ''
                                        info.area = ''
                                    }
                                    if (info.province == '香港特别行政区') {
                                        info.province = '中国香港'
                                        info.city = ''
                                        info.area = ''
                                    }
                                    if (info.province == '香港特别行政区') {
                                        info.province = '中国香港'
                                        info.city = ''
                                        info.area = ''
                                    }

                                    var tel_rr = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;

                                    if(tel || tel_rr.test(info.phone) || tel_rr.test(info.mobile)){

                                    }else {
                                        this.$notify({
                                            title: '警告',
                                            message: '手机号码填写错误',
                                            type: 'warning'
                                        });
                                    }
                                    if(info.details.search('拨打')!==-1){
                                        var tel_str = info.details.split('拨打')
                                        var tel_ = info.phone || info.mobile
                                        info.details=tel_str[0]+'拨打'+tel_+tel_str[1]
                                    }
                                    this.form.consignee = info.name
                                    this.form.contact_phone = tel || info.phone || info.mobile
                                    var province = this.provinceArr.find(d=>d.name==info.province)
                                    if(province){
                                        this.form.provinces = province.id
                                        $.ajax({
                                            url: '/admin/ord.order/city',
                                            type: 'POST',
                                            data: {pid:province.id},
                                            dataType: 'json',
                                            success:  (res)=> {
                                                this.cityArr = res.data
                                                var city = this.cityArr.find(d=>d.name==info.city)
                                                if(city){
                                                    this.form.city = city.id
                                                }else{
                                                    this.$message.error('格式错误');
                                                }

                                                $.ajax({
                                                    url: '/admin/ord.order/area',
                                                    type: 'POST',
                                                    data: {cid:city.id},
                                                    dataType: 'json',
                                                    success:  (res)=> {
                                                        this.areaArr = res.data
                                                        var area = this.areaArr.find(d=>d.name==info.area)
                                                        if(area){
                                                            this.form.area = area.id
                                                            this.form.address = info.details

                                                        }else{
                                                            this.form.address = info.area + info.details
                                                        }
                                                    }
                                                })
                                            }
                                        })
                                    }else{
                                        this.$message.error('省格式错误');
                                    }
                                }
                                // if(desc.replace(/\S{1,}[ ]\d+/g,'').search(/\S/g)==-1){
                                //     var goods = desc.match(/\S{1,}[ ]\d+/g)
                                //     goods.map(item=>{
                                //         desc = desc.replace(item,'')
                                //         item = item.replace(/[ ]\d+/,'')
                                //         setTimeout(()=>{
                                //             this.$notify({
                                //                 title: '警告',
                                //                 type: 'warning',
                                //                 message:'商品 '+item+' 无法识别',
                                //                 duration: 0
                                //             });
                                //         },100)
                                //     })
                                //     return false
                                // }else{
                                //
                                // }

                            }




                        }else{
                            this.$message.error('没有获取到商品列表');
                        }
                    }
                })
            },
            handleClose(done) {

            },
            handleSelectionChange(val){
                var goodsArr = []
                val.map(item=>{
                    goodsArr.push({
                        good_name: item.title,
                        num: 1,
                        gid: item.id,
                    })
                })
                this.goodsArr_ = goodsArr
            },
            del(id){
                var i = this.orderArr.findIndex(d=>d.id==id)
                this.form.goodsArr.splice(i,1)
            },
            handleSelect(selection,row){

            },
            handleAvatarSuccessList(res){
                this.selArr.push(res.data.url)
                this.form.collection_voucher = this.selArr.join(',')
            },
            handleRemove(file, fileList) {
                var url = file.url
                var index = this.selArr.findIndex(d=>d==url)
                this.selArr.splice(index,1)
                this.form.collection_voucher = this.selArr.join(',')
            },
            successOrder(status){
                if(this.good_has_err){
                    this.$message.error('存在未识别商品');
                    return false;
                }
                var isTest = false
                for(var i=0;i<this.form.goodsArr.length;i++){
                    var item = this.form.goodsArr[i]
                    if(parseInt(item.num)<=0){
                        isTest = true
                        break;
                    }
                }
                if(isTest){
                    this.$message({
                        type: 'info',
                        message:'商品数量不能小于1'
                    });
                    return false;
                }
                this.$refs.form.validate((valid) => {
                    if (valid) {

                    } else {
                        console.log('error submit!!');
                        return false;
                    }
                });

                this.form.status = status
                var reg_tel = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}-\d{4}$/;
                var tel_r = /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;

                if(!reg_tel.test(this.form.contact_phone)){
                    if(!tel_r.test(this.form.contact_phone)){
                        this.$message.error('手机号填写错误');
                        return false
                    }
                }
                for (var val in this.form ){
                    if(val!=='remark' && val!=='cooperative_express' && val!=='area'){
                        if(this.form[val]==''){
                            console.log(this.form[val],val,'val');
                            this.$message.error('信息填写错误');
                            return false
                        }
                    }
                }
                const loading = this.$loading({
                    lock: true,
                    text: 'Loading',
                    spinner: 'el-icon-loading',
                    background: 'rgba(0, 0, 0, 0.7)'
                });
                $.ajax({
                    url: '/admin/ord.order/add',
                    type: 'POST',
                    data:this.form,
                    dataType: 'json',
                    success: (res)=> {
                        if(res.code==1){
                            this.$message({
                                showClose: true,
                                message: res.msg,
                                duration:1000,
                                type: 'success',
                                onClose(){
                                    parent.location.reload()
                                }
                            });

                            // loading.close();
                        }else{
                            this.$message.error(res.msg);
                        }
                    }
                })
            },

            onSubmit(){
                var that = this
                var data={}
                if(this.formInline.good_type_id){
                    data.good_type_id = this.formInline.good_type_id
                }
                if(this.formInline.title){
                    data.title = this.formInline.title
                }
                $.ajax({
                    url: '/admin/ord.order/get_goodsarr',
                    type: 'GET',
                    data:this.formInline,
                    dataType: 'json',
                    success: function (res) {
                        that.goodsArr = []
                        res.data.map(item=>{
                            if(item.status==0){
                                that.goodsArr.push(item)
                            }
                        })
                    }
                })
            },

            success(){
                this.dialogVisible = false
                this.goodsArr_.map(item=>{
                    var i = this.form.goodsArr.findIndex(d=>d.gid==item.gid)
                    if(i==-1){
                        this.form.goodsArr.push(item)
                    }
                })
                // this.orderArr = this.orderArr_
            },
            handleAvatarSuccess(){},
            beforeAvatarUpload(){},
            handleChangeTc(e){
                var that = this
                this.form.provinces = e
                $.ajax({
                    url: '/admin/ord.order/city',
                    type: 'POST',
                    data: {pid:e},
                    dataType: 'json',
                    success: function (res) {
                        that.cityArr = res.data
                    }
                })
            },
            handleChangeShi(e) {
                var that = this
                $.ajax({
                    url: '/admin/ord.order/area',
                    type: 'POST',
                    data: {cid: e},
                    dataType: 'json',
                    success: function (res) {
                        that.areaArr = res.data

                    }
                })
            },
            handleAvatarSuccess_hxt(res, file){
                // this.imageUrl_hxt = URL.createObjectURL(file.raw);
                this.form.apartment_layout_diagram = res.data.url
            },
            beforeAvatarUpload(file) {
                // const isJPG = file.type === 'image/jpeg';
                const isLt1M = file.size / 1024 / 1024 < 50;

                // if (!isJPG) {
                //   this.$message.error('上传头像图片只能是 JPG 格式!');
                // }
                if (!isLt1M) {
                    this.$message.error('上传头像图片大小不能超过 50MB!');
                }
                return  isLt1M;
            },

            handlePictureCardPreview(file) {
                this.dialogImageUrl = file.url;
                this.dialogVisibleImg = true;
            }
        }
    })
</script>
<style>
    .avatar-uploader .el-upload {
        border: 1px dashed #d9d9d9;
        border-radius: 6px;
        cursor: pointer;
        position: relative;
        overflow: hidden;
    }
    .avatar-uploader .el-upload:hover {
        border-color: #409EFF;
    }
    .avatar-uploader-icon {
        font-size: 28px;
        color: #8c939d;
        width: 78px;
        height: 78px;
        line-height: 78px;
        text-align: center;
    }
    .avatar {
        width: 78px;
        height: 78px;
        display: block;
    }
</style>
<!--<div class="layuimini-container">-->
<!--    <form id="app-form" class="layui-form layuimini-form">-->
<!--        <div class="layui-form-item">-->
<!--            <label class="layui-form-label">收货人</label>-->
<!--            <div class="layui-input-block">-->
<!--                <input type="text" name="consignee" class="layui-input" placeholder="请输入收货人" value="">-->
<!--            </div>-->
<!--        </div>-->
<!--        <div class="layui-form-item">-->
<!--            <label class="layui-form-label">联系电话</label>-->
<!--            <div class="layui-input-block">-->
<!--                <input type="text" name="contact_phone" class="layui-input" placeholder="请输入联系电话" value="">-->
<!--            </div>-->
<!--        </div>-->
<!--        <div class="layui-form-item">-->
<!--            <label class="layui-form-label">详细地址</label>-->
<!--            <div class="layui-input-block">-->
<!--                <input type="text" name="address" class="layui-input" placeholder="请输入详细地址" value="">-->
<!--            </div>-->
<!--        </div>-->

<!--        <div class="layui-form-item">-->
<!--            <label class="layui-form-label">收款金额</label>-->
<!--            <div class="layui-input-block">-->
<!--                <input type="text" name="amount_collected" class="layui-input" placeholder="请输入收款金额" value="">-->
<!--            </div>-->
<!--        </div>-->

<!--        <div class="layui-form-item">-->
<!--            <label class="layui-form-label required">收款凭证</label>-->
<!--            <div class="layui-input-block layuimini-upload">-->
<!--                <input name="image" class="layui-input layui-col-xs6" readonly  placeholder="请上传图片" value="">-->
<!--                <div class="layuimini-upload-btn">-->
<!--                    <span><a class="layui-btn" data-upload="image" data-upload-number="one" data-upload-exts="png|jpg|ico|jpeg" data-upload-icon="image"><i class="fa fa-upload"></i> 上传</a></span>-->
<!--                </div>-->
<!--            </div>-->
<!--        </div>-->
<!--        <div class="hr-line"></div>-->
<!--        <div class="layui-form-item text-center">-->
<!--            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit>确认</button>-->
<!--            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>-->
<!--        </div>-->
<!--    </form>-->
<!--</div>-->
<!--<script type="text/javascript">-->
<!--    layui.use(['form','upload'], function(){-->
<!--        var form = layui.form;-->
<!--        var upload = layui.upload;-->
<!--        $ = layui.$;-->
<!--        //各种基于事件的操作。-->


<!--    });-->
<!--</script>-->